//
//  MessagePreview.swift
//  MiaoTan
//
//  Created by 于航 on 2024/9/22.
//

import Foundation

struct MessagePreview : Hashable {
    var user : User
    var lastMessage: String
    
    static func == (lhs: MessagePreview, rhs: MessagePreview) -> Bool {
        lhs.user == rhs.user && lhs.lastMessage == rhs.lastMessage
    }

}

extension MessagePreview {
    static let example = MessagePreview(user: User.others, lastMessage: "Thank you!")
    static let examples = [
        MessagePreview(user: User.others, lastMessage: "From first User!"),
        MessagePreview(user: User.others2, lastMessage: "From second User!")
    ]
}
